﻿using System;
using System.Windows.Forms;
using LeakView.common;
using LeakView.service;

namespace LeakView.view
{
    public partial class FormConfirmLeak : Form
    {
        private bool isConfirmAll = false;
        public bool IsConfirmAll { get => isConfirmAll; }

        public FormConfirmLeak(AjaxLeakInfo leak)
        {
            InitializeComponent();
            this.textBoxId.Text = leak.id.ToString();
            this.textBoxTime.Text = Tools.ConvertLongToDateTime(leak.time).ToString();
            this.textBoxDistance.Text = leak.location.ToString("F4") + " 千米";
        }

        private void buttonOk_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.OK;
        }

        private void buttonAll_Click(object sender, EventArgs e)
        {
            isConfirmAll = true;
            this.DialogResult = DialogResult.OK;
        }
    }
}
